package com.easyfun.healthmagicbox.comm;

import java.util.HashMap;
import java.util.Map;

import org.json.JSONObject;

import android.content.Context;

import com.easyfun.healthmagicbox.ormlite.ServerResponseCode;
import com.easyfun.healthmagicbox.pojo.ConstantData;
import com.easyfun.healthmagicbox.pojo.DoctorAndSuggestion;
import com.easyfun.healthmagicbox.sync.CommCallback;
import com.j256.ormlite.dao.Dao;

public class ForgetPasswordTask  extends BaseCommTask{
	
	private String musername;
	private String memail;
	Context mcontext;
	private CommCallback mcallback;
	
	public ForgetPasswordTask(Context context, String username, String email,
			CommCallback callback)
	{
		super(context,callback);
		musername = username;
		memail = email;
	}
	@Override
	public void run() {
		try {

				JSONObject serializedObj = new JSONObject();
				serializedObj.put("username", musername);
				serializedObj.put("email", memail);

				Map<String, String> parmas = new HashMap<String, String>();
				parmas.put("jsonstring", serializedObj.toString());
				String result = super.uploadByHTTP(parmas,
						ConstantData.UserForgetPasswordURI);
				ServerResponseCode resultcode = ServerResponseCode.parseOf(result);
				
				mcallback.setCommResult(this, result, resultcode);
				
			
		}	
		catch (Exception e)
		{
			
		}
	}
}
